#ifndef THREAD_H
#define THREAD_H

#include <QThread>
#include <QTcpSocket>
#include <QTcpServer>

class Sthread : public QThread
{
    Q_OBJECT
public:
    explicit Sthread(qintptr sock ,QObject *parent = nullptr);

protected:
    void run() override;

private:
    QList<QTcpSocket*> tcpSktList;//用来存储所有客户端socket的链表
    QTcpSocket* socket1;
    QTcpSocket* taojiezi;
    QTcpServer* server;
    qintptr sock1;
private slots:
    void onReadyRead();
   // void connection();
    void onDisconnected();

signals:
    void over();
};

#endif // THREAD_H
